Explicit Colors
Use explicit entries when your primary concern is the index value rather
than the color stored at that index.
Explicit colors cause no change in the color environment. For indexed
devices, the Palette Manager ignores the RGB value in a palette if a color is an explicit color. When you draw with an explicit color, you get the color that
is currently at the CLUT entry whose index corresponds to the explicit color's
position in the palette. When you call PmForeColor with a parameter of 12, it places a value of 12 into the foreground color field of your window's color
grafPort. (Since the value wraps around the table, the value placed into the
foreground field would be
12 modulo (maxIndex + 1)
where maxIndex is the maximum available index for each device under consideration.)
On direct devices an explicit entry produces the color for that entry in the
palette.
You can use explicit colors to monitor the color environment on an indexed
screen device. For example, you could draw a 16-by-16 grid of 256 explicit
colors in a small window. Whatever colors appear are exactly those in the
device's color table. If color table animation is taking place simultaneously,
the corresponding colors in the small window animate as well. If you display
such a window on a 4-bit device, the first 16 colors match the 16 colors
available in the device, and each row thereafter is a copy of the first row.